using System;
using System.Windows;
using System.Windows.Input;
using SmartBoard.Commands;

namespace SmartBoard.Book.Model
{
    public class BookCommandBinder:CommandBinderBase
    {
        public BookCommandBinder(UIElement book):base(book)
        {
            _bindings.Add(CreateNewBook());
        }

        private static CommandBinding CreateNewBook()
        {
            return new CommandBinding(BookCommands.New,
                                      (s, e) => BookManager.Instance.CreateNewBook(),
                                      (s, e) => BookManager.Instance.CanCreateNewBook());
        }
    }
}